///PHILOTES Source Code.  (C)2012 PhiloLabs

#include "OgreRoot.h"
#include "CgProgram/OgreCgPlugin.h"
#include "OctScene/OgreOctreePlugin.h"
#include "Direct3D9/OgreD3D9Plugin.h"

namespace Ogre {

	CgPlugin* cgPlugin;
	OctreePlugin* octreePlugin;
	D3D9Plugin* d3d9Plugin;
	//-----------------------------------------------------------------------
	extern "C" void _OgreCgPluginExport dllStartPlugin(void)
	{
		cgPlugin = PHILO_NEW CgPlugin();
		Root::getSingleton().installPlugin(cgPlugin);

		octreePlugin = PHILO_NEW OctreePlugin();
		Root::getSingleton().installPlugin(octreePlugin);

		d3d9Plugin = PHILO_NEW D3D9Plugin();
		Root::getSingleton().installPlugin(d3d9Plugin);

	}
	extern "C" void _OgreCgPluginExport dllStopPlugin(void)
	{
		Root::getSingleton().uninstallPlugin(cgPlugin);
		PHILO_DELETE cgPlugin;

		Root::getSingleton().uninstallPlugin(octreePlugin);
		PHILO_DELETE octreePlugin;

		Root::getSingleton().uninstallPlugin(d3d9Plugin);
		PHILO_DELETE d3d9Plugin;
	}
}
